<?php

class Sqlite2Db extends G_DB{
    public function escape($string) {
        return sqlite_escape_string($string);
    }

    public function exec($sql) {
        return sqlite_exec($this->_db_con,$sql);
    }

    public function fetch($rs) {
        return sqlite_fetch_array($rs,SQLITE_ASSOC);
    }

    public function free($rs) {
        return true;
    }

    public function getAffectedRows($rs) {
        return sqlite_changes($this->_db_con);
    }

    public function getInsertId($rs) {
        return sqlite_last_insert_rowid($this->_db_con);
    }

    public function query($sql) {
        return sqlite_query($this->_db_con,$sql,SQLITE_ASSOC);
    }    
}
